package com.wall.haven.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wall.haven.entity.BanImage;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ChenWangKun
 * @since 2023-10-17
 */
public interface BanImageMapper extends BaseMapper<BanImage> {

    @Select("select image_id from ban_image")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 500)
    @ResultType(String.class)
    void foreach(ResultHandler<String> handler);
}
